home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Medal Software 5
/
Gold Medal Software - Volume 5 (Gold Medal) (1995).iso
/
utils1
/
ecopy200.arj
/
ECOPY.DOC
< prev
next >
Wrap
Text File
|
1994-09-14
|
16KB
|
368 lines
▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄ Chris Jantzen
█ ▄▄▄█ █▄▄▄▄▄▄▄█ ▄▄▄█▄▄▄█ ▄▄█ █▄ SlugSoft
█▄▄▄ █ █ █ █ ▄ █▄▄▄ █ ▄ █ ▄█▄ ▄█┐ 1880 Ocean Blvd. SE
█▄▄▄▄▄█▄█▄▄▄█▄▄ █▄▄▄▄▄█▄▄▄█▄█│█▄█┌┘ Coos Bay, OR 97420-1911
└─────┴─┴──█▄▄▄█ ├────┴───┴─┘ └─┘ USA
└────┘ FidoNet 1:356/24
ECOPY v2.00
DOS command line enhanced copy program
INTRODUCTION
ECOPY provides services for copying files using XMS and EMS to speed
disk usage. It provides DISKCOPY-like functions and can even swap to a
fixed drive for extra memory if told to.
This program is designed for the "power user". If you are uncomfortable
at the DOS prompt, then this program might not for you. If you thrive at
the DOS prompt, then this program may become one of your better friends.
To learn about the program, study the help screen ('ECOPY /?').
The program notes and details were moved to this documentation as of
version 1.60. Before reading the following program notes, please study
the help screen to familiarize yourself with calling conventions.
PROGRAM NOTES
■ If only one source is provided, the destination path is assumed to be
the current directory. If more than one source is provided, then last
path on the command line is assumed to be the destination path (be
careful, this one's bitten me more than once <grin>). Note that the
destination is always a directory--ECOPY will not rename or concatenate
files when copying like XCOPY and COPY.
■ Default commands can be set with the ECOPYCMD environment variable
(e.g., entering SET ECOPYCMD=/STD on the command line would force ECOPY
to always use standard output for critical errors).
■ The path used for data swapping (if enabled) or temporary storage for
disk spanning is taken from the environment variable TEMP or assumed to
be C:\.
■ Commands with the "(XCOPY)" notation listed beside them are mostly
compatible with MS-DOS XCOPY commands. DISKCOPY and XCOPY are copyright
material by Microsoft Corp., this program does not use code from XCOPY
or DISKCOPY nor is it reverse engineered in any way from XCOPY or
DISKCOPY.
■ Multiple wildcards may be specified while only specifying one source
directory by placing a semicolon between each. See examples. This
feature can be extremely helpful for carefully selecting source files of
specified patterns from a long source path. Note that this feature is
similar to a feature of 4DOS/NDOS's COPY include list command.
■ The date for the /D and /B commands must be entered as numbers in your
native country specific order with date seperators (e.g., in the USA
date format, 4-14-91 would represent 14 Apr 91). If the date seperator
you like to use is the same as your switch character then it is
absolutely necessary to enclose the date in quotation marks (e.g.,
/D:"4/14/91"). Also note that any date-like seperator is accepted.
■ For file selection, /I is applied first to include files with special
attributes, then /X is applied to exclude unwanted files, then /D is
applied to catch files after the specified date, and finally the /B
parameter is applied to catch files before a date.
■ The attribute descriptor for the /I and /X commands is a list of one-
letter descriptors for the Read-only, Hidden, System, and Archive
attributes. For example, /X:RASH would only copy files that did NOT have
any attributes set; /I:RSH would only copy files that had no attribute,
the Read-only attribute, the System attribute, and/or the Hidden
attribute set. Note that /I:RA is automatically implied unless changed
manually, or unless /A or /M are used. Also, each successive /I or /X
resets the previous setting--the commands are not cumulative. Last
note--two special "attributes" exists--the X attribute is a pseudonym
for all the attributes: /I:X is the same as /I:RASH; the B attribute is
a pseudonym for NO attributes (/I always has an implied B tacked on):
/I:R/X:B would only select files with just the Read-only attribute set.
The /A command is simply a simplified form of /I:RA/X:B and the /M
command is a slightly advanced form of /A that toggles the Archive
attribute off.
■ How /I and /X REALLY work: /I includes all files with attributes set
as specified or not (e.g., /I:RA will match all files with Read-only and
Archive, Read-only only, Archive only, or nothing at all); /I will not
include files that attributes set that are not specified (e.g., /I:RA
will not select files that have the Hidden or System attributes set).
The /X parameter then excludes files from THIS reduced set if they have
exactly the attributes specified (e.g., /I:RA/X:R would include all
files as before but exclude files that had only the Read-only attribute
set but would still accept files with the Read-only and the Archive
attributes set). Confusing? These two commands can be very powerful if
used carefully. As noted, the /A command is simply a macro for /I:RA/X:B
to backup normal files that only have the Archive and optionally the
Read-Only bit set (like XCOPY).
■ How /IF and /XF work: First, all other selection criteria must be met
(include /I and /X filters). Files are then excluded by /XF filespecs
(note that you can specify more than one filespec, e.g.,
/XF:*.EXE;*.COM) unless they match /IF filespecs. Consider the following
example:
The directory in case contains the following files:
BOZO.DAT
BOZO.EXE
BOFFO.DAT
BOFFO.EXE
ECOPY.EXE
ECOPY *.* TEMP /XF:*.EXE /IF:BOZO.EXE
The following files will be copied to the TEMP subdirectory:
BOZO.DAT
BOZO.EXE
BOFFO.DAT
Note that all EXE files were excluded except for BOZO.EXE which was
explicitly included. All other files passed through normally.
■ The fill command requires both the source and destination to be
online, so that the destination may be evaluated before reading the
source files. (Normally only the disk being processed is required to be
online as per the read/write cycle.) The QuickMove (/MV) also requires
both the destination and source to be online simultaneously. Also note
that if the /S command is used, the destination usually won't be filled
optimally because of the internal routines used to anticipate the space
used up by the directory structures themselves. /MD cannot be used in
conjunction with /F.
■ If the DIET TSR is installed, ECOPY will correctly determine the
amount of space the files will take up after expansion by examining
their headers. This can take a while, but the technique used is as fast
as possible. DIET is copyright Teddy Matsumoto.
■ The verify command actually reads the data off the disk and compares
it to just-written data.
EXAMPLES
ECOPY C:\ A:\ /X:RH
Copy any files in the root directory that do NOT have just the
Read-only and Hidden attribute set to the A: drive.
ECOPY C:\ A:\ /I:H/P/L
Copy all files in the root directory including Hidden files, asking
the user if he wants to copy each file, listing those he didn't choose
to copy.
ECOPY C:\WORK A:\ /F/A/Z
Move changed C:\WORK files to floppy, finding best fit.
ECOPY C:\ A:\ /DC/F/M
Backup hard disk to floppy, finding optimum use for floppies.
ECOPY A:\ C:\ /DC
Restore one backup disk to hard drive.
ECOPY A:\ A:\ /DC
Performs effective DISKCOPY.
ECOPY A:\ B:\ /DC/SW-
Performs effective DISKCOPY, but will not swap to temporary file.
ECOPY X:\A*;B* C:\TEMP
Copies X:\A*.* and X:\B*.* to C:\TEMP (note multiple wildcards).
ECOPY X:\A*; B* C:\TEMP
Same as above with different semicolon spacing--still valid.
ECOPY X:\A* ;B* C:\TEMP
Same as above with different semicolon spacing--still valid.
ECOPY X:\A* ; B* C:\TEMP
Same as above with different semicolon spacing--still valid.
ECOPY C:\WORK\PASCAL\PROJECTS\NEW\A*;B*;C* C:\TEMP
Illustrates how multi-selection can be helpful with long source path
names. This is equivalent to:
ECOPY C:\WORK\PASCAL\PROJECTS\NEW\A*
C:\WORK\PASCAL\PROJECTS\NEW\B* C:\WORK\PASCAL\PROJECTS\NEW\C*
C:\TEMP
On one line. Notice how the multi-selection version is much more
concise.
I'm afraid that's all the documentation available at this point.
THE FUTURE
ECOPY is a constantly expanding project (now, if only the EXE would stop
doing that!), and I have several plans for future upgrades that are
listed in the history file. If you have any nifty ideas, send them with
your registration, or mail them to the address above.
KUDOS
Special thanks go out to the following:
Tim Van Over: One of those all powerful influences in our area--he even
bought me my first Turbo Pascal.
Mark Magill: Sysop of The College BBS and general wonderful guy.
Jesse Williamson: He keeps prodding me into these projects--no,
the order you appeared in this file is not of
significance.
Fabrice Bellard: For his wonderful LZEXE program, and especially for allowing
developers to use it for free.
Teddy Matsumoto: For his wonderful DIET program.
Anyone who took the time to read this (whew).
And especially YOU THE REGISTERED USERS (without whom I might not write
this, or actually, without whom I appear to be writing this...).
GENERAL NOTES
If you are running under a DOS version less than 3.0, then ECOPY may
have trouble finding itself (and it's internal overlay if the version
you are using has such). ECOPY will look in the PATH (starting in the
current directory) and then try the ECOPY environment variable. To set
ECOPY's path using the environment variable, type SET ECOPY=C:\UTILS\
from the DOS prompt (if C:\UTILS\ is where you keep ECOPY). Substitute
the path to ECOPY for C:\UTILS\ above. (Trailing backslash is not
necessary, but doesn't harm things.)
If you experience trouble running ECOPY on a 386, set the environment
variable NO386 to anything (e.g., SET NO386=Y) to disable 386
instructions. (For example, it is known that older versions of QEMM will
corrupt the 32-bit registers and cause irregular program behavior.) If
you experience trouble running it on a non-386, you may also want to try
disabling 386 instructions, just in case the CPU detection routines
think your CPU is an 80386 (for whatever strange reason).
Also, ECOPY may maintain a SLUGSOFT.INI section. If it does, then by default
it will create SLUGSOFT.INI in the root directory of the drive from which
ECOPY was executed. If you have SlugSoft utilities stored on different
drives, then you may want to use the SLUGSOFT environment variable. If
you wish for SLUGSOFT.INI to reside in C:\UTILS, for example, you would
type SET SLUGSOFT=C:\UTILS from the DOS command line.
COMMAND LINE PARSING NOTES
ECOPY uses the standard SlugSoft command line parser, which means a certain
number of useful features are built-in for your convienence. Here are some
notes on special features:
■ The parser will read default command line options using the ECOPYCMD
environment variable. Say, for example, that you want (for whatever strange
reason) to have ECOPY display its help screen each time it starts, you would
simply type SET ECOPYCMD=/? from the DOS command line.
■ By default anything seperated by a space or tab character is assumed to be
another token on the command line. If you wish for several words to be
considered as one token, then enclose them in quotation marks (""). E.g.,
normally ECOPY ONE TWO would cause ECOPY to act on ONE and TWO, but
ECOPY "ONE TWO" would cause ECOPY to act on ONE TWO.
■ The parser will read an external file as part of the command line using
the very standard @ operator. E.g., ECOPY @FILENAME would read the file
named "FILENAME" and pretend that each line of the file were an additional
command line to be parsed. If a line in the file starts with a semicolon
(";") then it is assumed to be a comment and is NOT parsed. Each line can
not exceed 255 characters, but the file can be as large as desired. If you
wish to pass the @ character literally on the command line, then enclose
it in quotation marks ("") like such ECOPY "@FILENAME".
■ The parser will accept either a forward slash ("/") or a dash ("-") as a
switch for command line commands. E.g., ECOPY -? and ECOPY /? will both work.
■ The parser will automatically look for CmdMacro entries in the
SLUGSOFT.INI file (located as specified above). Each entry must be named
like CmdMacro=NAME MACRO. The macro name is specified as the first word
(NAME above) and the macro value is everything else (MACRO above). An
example:
[ECOPY]
CmdMacro=HELP /?
If this were in SLUGSOFT.INI, then typing ECOPY /HELP on the command line
would be the same as typing ECOPY /?. Command macros can replace built-in
commands. In fact, command macros can even refer to each other. Be
careful, though, as you can develop looping macros that will cause weird
results. If you wish to refer to the original command in your macro,
then precede the name with an asterisk ("*"), like so:
[ECOPY]
CmdMacro=FROB /*FROB
You may also use the asterisk on the command line to use only the
original internal command. There is one special consideration: All the
CmdMacro entries MUST be grouped together. All entries after the first
break will be ignored. Confusing? It's a very powerful feature if you
can figure it out. (Or if I write better documentation.)
LICENSE
You, the user, have a license to use this program for 30 days after
receiving the executables. After this trial period, you must register
the program with SlugSoft (see below). You also have a license to copy
and share the program freely as long as the package is shared in its
entirety and no more than $10US is ever charged for its distribution.
This program may not be packaged with any other program without express
written permission from the author.
DISCLAIMER
SlugSoft and Chris Jantzen disclaim all warranties as to this software,
whether express or implied, including without limitation any warranties
of merchantability, fitness for a particular purpose, functionality or
data integrity or protection. If it damages your hardware or data in
any fashion, we are not responsible in any way.
REGISTRATION
Registration is nice and easy, so PLEASE DON'T SKIP OVER THIS SECTION!
To register this program, just send me a letter (optional) enclosing a
postcard very clearly stating your name, address, and the current
version you are using. That's it! It would also be nice if you wrote
about how the weather is where you're writing from, how much you like
the program, new features you might like to see in the program, and
other nice things.
If you are using this program in a commercial, government, or
educational environment, I would like to restate that I am not
responsible for what this program does on your machine (although I will
try to help if it doesn't seem to work right). I would also like to ask
that along with your letter you send some information, brochures, etc.
on what your company/department/institution does. I cannot help you if
you need help with special paperwork (such as P.O.'s). I would also
respectfully ask that you send me one of your company's/agency's
products.
Note, however, that although I don't actually ask for anything for
registration, you won't actually really receive anything for your
registration. You will, however, feel good about yourself, and if you
send a self-addressed, stamped envelope (with enough postage from the
USA to wherever you are) with your letter, I'll send some some heartfelt
thanks as well as respond to any concerns you brought up in your letter.
All donations and gifts joyfully accepted.
OTHER COPYRIGHTS, TRADEMARKS, AND PATENTS
References to programs other than ECOPY and other SlugSoft programs
without their respective copyright, trademark, or patent notices are not
meant to be construed as challenges to such programs' copyright,
trademark, and/or patent statuses.